// 购物车状态
import { findHeadCategory } from '@/api/home'
export default {
  namespaced: true,
  state: () => ({
    list: []
  }),
  mutations: {
    setCategory (state, payload) {
      state.list = payload
    }
  },
  actions: {
    async asyncSteList (ctx) {
      const res = await findHeadCategory()
      console.log(res.result)
      ctx.commit('setCategory', res.result)
    }
  }

}
